
<div style = "width: 450px">
<?php echo $this->Form->create('Screen', array('class' => 'form-horizontal', 'id' => 'myformedit'));?>
	  <div class="control-group">
	    <label class="control-label">Function Name</label>
	    <div class="controls">
	      <?php echo $this->Form->input('function_id', array('label' => false , 'value' => isset($data)?$data['Screen']['function_id']:null));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label" >Screen Name(En)</label>
	    <div class="controls">
	      <?php echo $this->Form->input('name', array('label' => false, 'value' => isset($data)?$data['Screen']['name']:null));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label">Screen Name(Ja)</label>
	    <div class="controls">
	      <?php echo $this->Form->input('name_ja', array('label' => false, 'value' => isset($data)?$data['Screen']['name_ja']:null));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label" >Screen Name(Vi)</label>
	    <div class="controls">
	      <?php echo $this->Form->input('name_vi', array('label' => false, 'value' => isset($data)?$data['Screen']['name_vi']:null));?>
	    </div>
	  </div>
	  <div class="control-group">
	    <label class="control-label" >Screen Code</label>
	    <div class="controls">
	      <?php echo $this->Form->input('code', array('label' =>false, 'value' =>  isset($data)?$data['Screen']['code']:null));?>
	    </div>
	  </div>
	  <div class="modal-footer" >
	     <div align = "center">
	     <button type="submit" class="btn btn-primary">Save</button>
	     </div> 
	  </div>
<?php echo $this->Form->end();?>
</div>
<script>
$( "#myformedit" ).validate({
  rules: {
//	"data[Screen][function_id]": {
//	 	required: true
//	 },
    "data[Screen][name]": {
    	required: true
    },
    "data[Screen][name_ja]": {
    	required: true
    },
    "data[Screen][name_vi]": {
        required: true
    },
    "data[Screen][code]": {
        required: true
    }
  }
});
</script>